#ifndef UTILS_H
#define	UTILS_H
#include <stdio.h>
#include <yaml-cpp/yaml.h>

std::string shorthand(YAML::Node n);
void dump(YAML::Node n, int indent = 0);
YAML::Node getNode(YAML::Node parent, std::string path);
YAML::Node overrideValues(YAML::Node dflt, YAML::Node overridden);
bool structureContainsNull(YAML::Node structure);

#define SYVERROR 0
#define SYVWARNING 1
#define SYVNOTICE 2
#define SYVTRACE 3

#define SYVDEBUG 0
#define SYVDEBUGLEVEL SYVTRACE

#define SYVDEBUGOUT(level, s) \
if(SYVDEBUG && level >= SYVDEBUGLEVEL) { \
s \
}

typedef std::vector<std::string> sv;

bool containsScalarValue(YAML::Node n, std::string v);
bool mapHasKeyWithValue(YAML::Node map, std::string value);
bool sequenceHasValue(YAML::Node seq, std::string value);
YAML::Node copy(YAML::Node n);
bool comparesEqual(YAML::Node a, YAML::Node b);

//YAML::Node copyTree(YAML::Node n);

void dump(sv x);
#endif	/* UTILS_H */

